<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>vue jquery</title>
  <script src="../assets/js/jQuery-3.3.1.min.js"></script>
  <script src="../assets/js/vue.min.js"></script>
</head>
<body>
  <h1>vue jquery</h1>
  <hr>
  <div id="app">
    {{ msg }}
  </div>
  <script>
    var vue = new Vue({
      el: '#app',
      data: {
        msg: '第四季',
      },
      mounted: function () {
        // jQuery要在mounted和update钩子函数中使用才有效，否则找不到DOM节点
        $('#app').html('我是jQuery');
       },
       methods: {
        add: function () { 
          console.log('add method');
        }
       }
    })
    vue.add();
  </script>
</body>
</html>